package com.remoter.basic.transport;

import java.net.InetSocketAddress;
import java.util.concurrent.ExecutorService;

import com.remoter.basic.bean.support.RemoterRequest;
import com.remoter.basic.bean.support.RemoterResponse;
import com.remoter.basic.util.ServiceLoader.SPI;
import com.remoter.basic.util.ServiceLoader.Scope;

/**
 * @author			koko
 * @date 			2017-08-10 13:32:29
 * @description 	类功能说明
 */
@SPI(scope=Scope.PROTOTYPE)
public interface IClient {
	
	public void connect(ExecutorService executorService,InetSocketAddress remote)throws Exception;
	
	public void disConnect()throws Exception;
	
	public boolean isAvailable();
	
	public InetSocketAddress getRemoteAddress();
	public InetSocketAddress getLocalAddress();
	
	public RemoterResponse sendMessage(RemoterRequest remoterRequest)throws Exception;
	
}